package team.seekers.hula.message.tunnel.entity.dao;


import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import team.seekers.hula.common.entity.enums.TunnelStatusEnum;

import java.io.Serializable;
import java.util.Date;


@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="tunnel对象", description="聊天隧道表")
@TableName(value = "tunnel")
public class TunnelDO implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    /**
     * 一方
     */
    private String userId;


    /**
     * 另一方
     */
    private String anotherId;

    /**
     * 状态
     */
    @JsonValue
    private TunnelStatusEnum status;

    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;
}
